﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VIKI.IDAL;
using VIKI.LINQ;

namespace VIKI.BLL
{
    public class UserBLL
    {
        private static readonly IUserDAL dal = VIKI.Factory.DataAccess.CreateUser();

        public Guid Insert(User user)
        {
            try
            {
                return dal.Insert(user);
            }
            catch
            {
                throw;
            }
        }

        public User FindUserById(Guid userId)
        {
            return dal.FindUserById(userId);
        }
        public User FindUserByName(string userName)
        {
            return dal.FindUserByName(userName);
        }

        public User FindUserByEmail(string email)
        {
            return dal.FindUserByName(email);
        }
    }
}
